package com.changeover.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="user_role")
public class UserRole {
    
    @ManyToOne
    @JoinColumn(name="user_account_id", nullable=false, insertable=false, updatable=false)
    private User user;
    
    @Id
    @Column(name="ID")
    private int id;
    
    @Column(name="role_name")
    private String roleName;
    
    @Column(name="user_account_id")
    private int userAccountId;

//    @JoinColumn(name="user_id", nullable=false)
    public User getUser() {
        return user;
    }
    
	public void setUser(User user) {
		this.user = user;
	}


	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public int getUserAccountId() {
		return userAccountId;
	}

	public void setUserAccountId(int userAccountId) {
		this.userAccountId = userAccountId;
	}


}
